package DAO;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import ValueObject.DirectorateVO;

public interface DirectorateDAO {
    /**
     * Show list of directorate.
     * @param key
     * @return list of directorate
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    ArrayList<DirectorateVO> getList(String key) throws ClassNotFoundException, SQLException;

    /**
     * Get an object of Directorate.
     * @param id
     * @return details of a directorate
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    DirectorateVO getDirect(String id) throws ClassNotFoundException, SQLException;
    /**
     * Update value of directorate to database
     * @param directorate
     * @return true if update successfully, otherwise return false
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    boolean updateDirect(DirectorateVO directorate) throws ClassNotFoundException, SQLException;
    /**
     * Update status of selected directorate and save to database.
     * @param id
     * @param status
     * @return true if change status successfully, otherwise return false
     * @throws ClassNotFoundException
     * @throws SQLException
     */
    boolean activeStatus(int id, boolean status) throws ClassNotFoundException, SQLException;
}
